<?php
class DataDefineContext {
	protected $ddObj;
	
	public function __construct($type) {
		$clz = ucfirst($type) . 'DataDefine';
		if(!class_exists($clz)) DataException::throwEx("DataDefine: {$type} not found!");
		$this->ddObj = new $clz();
	}
	
	public function getDataDefine() {
		return $this->ddObj;
	}
	
	public function parse($defineCfg) {
		return $this->ddObj->parse($defineCfg);
	}
}

final class DDC extends DataDefineContext {}
?>